import React from 'react'
import App from './app'
import {useState} from "react"
import {Provider} from "../utils/context"
import {my_useState} from "../index"
function Appfather() {
 let [name,setName] =my_useState("hzangsan")
 let [age,setAge] =my_useState("20")
  let [flag,setFlag] = useState(true)
   let [obj,setObj] = useState({
       name:"我是爷爷组件的数据"
   })
  return (
    <div>
        <hr />
           <h4>{name}</h4>
           <h4>{age}</h4>
        <hr />
        <button onClick={()=>setAge("21")}>点击</button>
        {/* {
            flag?<App></App> :""
        } */}
        <Provider value={obj}>
             <App></App>
        </Provider>
       
        
    </div>
  )
}

export default Appfather